package com.scau.XFourPOS.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**     
 * 类名称：SaleReturnItem
 * 类描述：退货明细表
 * 创建人：庄祥鹏
 * */
@Entity
@Table(name = "sale_return_item")
public class SaleReturnItem {
	@Id
	@Column(unique = true, nullable = false,length=11)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;
	
	@ManyToOne  
	@JoinColumn(name="sale_return_id")
	private SaleReturn saleReturn; 
	
	@OneToOne
	@JoinColumn(name="product_id")
	private Product product_id; 
	
	@Column(length=10)
	private int quantity;
	
	@Column(length=10)
	private Double price; 
	
	@Column(length=10)
	private Double total;

	@Column(length=150)
	private String reason;
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	
	public SaleReturn getSaleReturn() {
		return saleReturn;
	}

	public void setSaleReturn(SaleReturn saleReturn) {
		this.saleReturn = saleReturn;
	}

	public Product getProduct_id() {
		return product_id;
	}

	public void setProduct_id(Product product_id) {
		this.product_id = product_id;
	}

	
	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	} 
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}
}
